<html>
    <head>
        <title>Math Example</title>
    </head>
    <body>
        <h1>Math Example</h1>>
        <P>
            <script language = "JavaScript" type = "text/javascript" src = "timegreet.js"></script>
        </P>
        <p>How random are JavaScript'srandom numbers?
            Let's generate 500 of them and find out.
        </p>
        <script language = "JavaScript" type = "text/javascript" >
        total = 0
        for (i=1;i<500;i++) {
            num = Math.random()
            total += num
            if (i% 100 == 0)
            document.write('Generated' + i + 'numbers..<br>' + total + '<br>')
        }
        average = total / 500
        average = Math.round(average*100)/100
        document.write(average)
        document.write('<H2>Arerage of 500 numbers:' + average + '</H2>')
        let lastname = 'asdjfakjflajfoeifdnfsfoiendsflsdfjsdf'
        with (lastname) {
            window.alert('length of last name:' + length)
            capname = toUpperCase()
            document.write(capname + '<br>')
        }
        </script>
    </body>

</html>